import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'   //导入路由模块
import ElementPlus from 'element-plus'  //导入element-plus
import 'element-plus/dist/index.css'  //导入element-plus样式
import { createPinia } from 'pinia'   //导入创建pinia方法
import piniaPlginPersist from 'pinia-plugin-persist'    //导入pinia持久化插件
import './router/premission'    //导入检查用户是否登录模块
const app = createApp(App)    //创建跟组件实例app
app.use(ElementPlus)    //挂载ElementPlus
const pinia = createPinia()   //创建pinia实例
pinia.use(piniaPlginPersist)    //pinia实例使用持久化插件实例
app.use(pinia)  //跟组件挂载pinia
app.use(router) //挂载路由
app.mount('#app')
